﻿using System.Runtime.Serialization;
using BusinessLayer;

namespace ServiceLayer
{
    [DataContract]
    public class CarDTO
    {
        [DataMember]
        public string Name { set; get; }

        [DataMember]
        public int Id { set; get; }

        [DataMember]
        public string CarNumber { set; get; }

        [DataMember]
        public bool Enabled { set; get; }

        internal CarDTO(Car car)
        {
            Name = car.Name;
            Id = car.Id;
            CarNumber = car.CarNumber;
            Enabled = car.Enabled;
        }
    }
}